package com.learn.remote;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 《Spring源码深度解析》第12章 远程服务 P340
 * 网上的一个demo：https://blog.csdn.net/ajun_studio/article/details/7681640
 */
public class ClientTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("test/remote/RMIClient.xml");
		// 获取的是 RmiProxyFactoryBean 返回的添加了增强器的代理对象
        HelloRMIService hms = context.getBean("myClient", HelloRMIService.class);
        System.out.println(hms.getAdd(1, 2));
    }
    /* Output:
     3
     *///~
}
